package cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment4Refactoring.scoreList1.core;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.transform.Source;

import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment3Refactoring.bean.Students;

public class StudentsDeserializer {
	public static Students run(Source studentList){
		try {
			JAXBContext jaxbContext = JAXBContext.newInstance(Students.class);
			Unmarshaller um=jaxbContext.createUnmarshaller();
			return (Students)um.unmarshal(studentList);
		} catch (JAXBException e) {
			e.printStackTrace();
		}
		return null;
	}
}
